package com.sh4.entity;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.type.TrueFalseType;

/**
 * Menu entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user")
public class User implements java.io.Serializable {

	// Fields

	/***
	 * 主键id
	 */
	private String id;
	/**
	 * 用户昵称
	 */
	private String userCode;
	/***
	 * 公司id
	 */
	private String companyId;
	/***
	 * 用户名
	 */
	private String userName;
	/***
	 * 密码
	 */
	private String password;
	/***
	 * 盐值 用于加密密码
	 */
	private String salt;
	/***
	 * y邮箱
	 */
	private String emil;
	
	/***
	 * 创建日期
	 */
	private Date creatDate;
	/***
	 * 创建者
	 */
	private String creatBy;
	/***
	 * 更新日期
	 */
	private Date updateDate;
	/***
	 * 更新者
	 */
	private String updateBy;
	/***
	 * 是否启用状态 true=启用  false=删除
	 */
	private Boolean status;
	/***
	 * 备注
	 */
	private String remark;

	// Constructors

	/** default constructor */
	public User() {
	}

	
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID_", unique = true, nullable = false, length = 50)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}
	@Column(name="USER_CODE_",unique = true, length = 50)
	public String getUserCode() {
		return userCode;
	}


	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	@Column(name = "COMPANY_ID_", length = 50)
	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	@Column(name = "STATUS_", length = 50)
	public Boolean getStatus() {
		return this.status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}
	
	@Column(name = "USER_NAME_", length = 50)
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "PASSWORD_", length = 100)
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column(name = "SALT_", length = 50)
	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	@Column(name = "EMil_", length = 50)
	public String getEmil() {
		return emil;
	}

	public void setEmil(String emil) {
		this.emil = emil;
	}
	
	@Column(name = "CREATE_DATE_",updatable = false)
	public Date getCreatDate() {
		return creatDate;
	}
	
	
	public void setCreatDate(Date creatDate) {
		this.creatDate = creatDate;
	}

	@Column(name = "CREATE_BY_", length = 50)
	public String getCreatBy() {
		return creatBy;
	}

	public void setCreatBy(String creatBy) {
		this.creatBy = creatBy;
	}

	@Column(name = "UPDATE_DATE_")
	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	@Column(name = "UPDATE_BY_", length = 50)
	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	@Column(name = "REMARK_")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}


}